﻿<!doctype html>
<!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
<!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
<!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>二维码扫描</title>
<!-- 
要详细了解文件顶部 html 标签周围的条件注释:
paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/

如果您使用的是 modernizr (http://www.modernizr.com/) 的自定义内部版本，请执行以下操作:
* 在此处将链接插入 js 
* 将下方链接移至 html5shiv
  * 将“no-js”类添加到顶部的 html 标签
* 如果 modernizr 内部版本中包含 MQ Polyfill，您也可以将链接移至 respond.min.js 
-->
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style type="text/css">
* {
	margin: 0;
	padding: 0;
}
.gridContainer {
	font-family: "微软雅黑";
}
.gridContainer input {
	float: left;
	background: transparent;
	font-size: 16px;
	border: 0;
}
.gridContainer font {
	float: left;
	font-size: 14px;
	color: #2a220e;
}
.gridContainer ol{width:280px;}
.gridContainer ol li{line-height:22px;text-align:left;color:#2a220e;font-size:14px;}
p.message{font-size:12px;text-align:left;font-weight:bold;line-height:22px;border-bottom:1px dashed #ccc;}
p.message span{display:inline-block;}
</style>
<script src="../js/jquery-1.4.4.min.js"   type="text/javascript" ></script>
<script src="../js/theme.js" type="text/javascript" charset="UTF-8"></script>
<script src="../js/json2.js" type="text/javascript"></script>
<script src="../js/utils.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	var paramStr=location.search;
	var openId = getWxParameter("openId",paramStr);
	var shopId = getWxParameter("shopId",paramStr);
	
	// 获取二维码
	$.get("../../Qr/insertQR/"+openId+"/"+shopId, function(data) {
		var message = JSON.parse(data);
		if(message.state==0)
		{
	   		var qrUrl=getHeadIndexValue(0,message,'qrUrl');
            if(qrUrl == null){
            	 alert("二维码生成失败");
            }
            else{
	         	$("#qrcodepic").attr('src',qrUrl);
            }
		}
		else{
			alert(message.msg);
		}
	});
	
	$.get("../../member/find/shopId/"+shopId+"/openId/"+openId, function(data) {
		var message = JSON.parse(data);
		if(message.state==0)
		{
			//"MemberCardNo","CustomerName","ValidDateTime","Discount","levelName",
			//"createTime","DepositAmount",
			//"IntegralAmount","ConsumeAmount","CashCouponAmount","CouponAmount"
			var MemberCardNo=getHeadIndexValue(0,message,'MemberCardNo');
			var CustomerName=getHeadIndexValue(0,message,'CustomerName');
			var ValidDateTime=getHeadIndexValue(0,message,'ValidDateTime');
			var Discount=getHeadIndexValue(0,message,'Discount');
		    var LevelName=getHeadIndexValue(0,message,'levelName');
		    var CreateFileTime=getHeadIndexValue(0,message,'createTime');
		    var DepositAmount=getHeadIndexValue(0,message,'DepositAmount');
		    var IntegralAmount=getHeadIndexValue(0,message,'IntegralAmount');
		    var ConsumeAmount=getHeadIndexValue(0,message,'ConsumeAmount');
		    var CashCouponAmount=getHeadIndexValue(0,message,'CashCouponAmount');
		    var CouponAmount=getHeadIndexValue(0,message,'CouponAmount');
		    $("#MemberCardNo").val(MemberCardNo);
		    $("#CustomerName").val(CustomerName);
		    $("#LevelName").val(LevelName);
		    $("#IntegralAmount").val(IntegralAmount);
		    $("#DepositAmount").val(DepositAmount);
		    $("#CouponAmount").val(CouponAmount);
		}else{
			alert(message.msg);
		}
		//document.getElelmentById("CouponAmount").value=CouponAmount;
	});
	
});
</script>
</head>
<body>
<div class="gridContainer clearfix" align="center" style="margin:0 auto;width:308px;height:373px;background:url('../../images/card.png') no-repeat;">
  <div class="logo" style="padding:10px 0 0 13px;text-align:left;margin-top:6px"><img src="../../images/HSlogo.png" style="height:30px;" /></div>
  <div id="LayoutDiv1" style="padding:10px 0 0 13px;width:100px; height:100px;padding-top:8px;float:left;">
    <div><img id="qrcodepic" src="tm.jpg" width="100" height="100" /></div>
  </div>
  <div id="" style="margin-top:4px;height:22px;width:174px;float:right;">
    <div id="LayoutDiv5"> <font size="4">级别：</font>
      <input type="text" id="LevelName" style="width:90px;position:relative;left:6px;"  />
    </div>
  </div>
  <div id="" style="height:22px;width:174px;float:right;">
    <div  id="LayoutDiv5" style=""> <font size="4" >姓名：</font>
      <input type="text" id="CustomerName" style="width:90px;position:relative;left:6px;"  />
    </div>
  </div>
  <div id="LayoutDiv2" style="height:22px;width:174px;float:right;" >
    <div id="LayoutDiv3"> <font size="4">卡号：</font>
      <input type="text" id="MemberCardNo" style="width:90px;position:relative;left:6px;"  />
    </div>
  </div>
  <div id="" style="height:22px;width:174px;float:right;">
    <div  id="" style="width:84px;float:left;"> <font size="4">积分：</font>
      <input type="text" id="IntegralAmount"   style="width:40px;height:20px;"  />
    </div>
    <div id="" style="width:84px;float:right" > <font size="4" style="">储值：</font>
      <input type="text" id="DepositAmount"  style="width:40px;height:20px;"  />
    </div>
  </div>
  <div id="" style="width:174px;height:22px;float:right;">
    <div  id="LayoutDiv5" style=""> <font size="4">优惠券：</font>
      <input type="text" id="CouponAmount" style="width:90px;position:relative;left:6px;" />
    </div>
  </div>
  <div style="clear:both;padding-top:26px;"></div>
  <p class="message"><span style="width:150px;">车牌号：京A86547</span>下次保养日期：2014-2-20</p>
  <p class="message"><span style="width:150px;">保险到期：2014-5-7</span>车辆年检：2014-5-7</p>
  <ol type="1">
  	<li>本卡仅限本人使用，转让、转借本卡可能导致您的会员权益受损；</li>
  	<li>消费时请主动出示本卡，以获得您应有的专属权益（包括积分、优惠、折扣等等）；</li>
  	<li>请妥善保管本卡以及相关密码，随意让他人拍摄、泄露密码等行为可能会损害您的账户安全；</li>
  	<li>发行公司享受此卡在法律许可范围内的最终解释权。</li>
  </ol>
</div>
</body>
</html>
